<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../../resources/css/bootstrap/bootstrap.min.css">
    <link rel="stylesheet" href="../../resources/css/style.css">
    <link href="../../resources/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link rel="stylesheet" href="../../resources/css/plugins/bootstrap-table/bootstrap-table.css"/>
    <link rel="stylesheet" href="../../resources/css/pluginsExt/common.css">
    <style>
        .fixed-table-toolbar{
            padding-left: 28px;
            padding-right: 5px;
        }
        .fixed-table-container {
            margin-left: 28px;
            margin-right: 5px;
        }
        .table > tbody > tr > td{
            line-height: 2.42857;
        }
    </style>
</head>
<body>
<div class="white-bg row-fluid">
    <div class="row wrapper wrapper-content animated fadeInRight">
        <div class="portlet box grey col-xs-12">
            <div class="portlet-body">
                <table id="fullTab">
                    <thead>
                    <!--表头设置-->
                    <tr>
                        <th data-field="Name"  data-align="center">用户名</th>
                        <th data-field="Phone"  data-align="center">手机号码</th>
                        <th data-field="Gender"  data-align="center">注册时间</th>
                        <th data-field="curPoi" data-align="center">积分</th>
                        <th data-field="Address" data-align="center">会员等级</th>
                        <th data-field="operate" data-align="center" data-formatter="operateFormatter">操作</th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
</div>
</body>
<script src="../../resources/js/jquery-2.1.1.js"></script>
<script src="../../resources/js/bootstrap/bootstrap.min.js"></script>
<script src="../../resources/js/plugins/bootstrap-table/bootstrap-table.js"></script>
<script src="../../resources/js/plugins/bootstrap-table/bootstrap-table-zh-CN.js"></script>
<script src="../../resources/js/pluginsExt/bootstrapTable/tableExt.js"></script>
<script src="../../resources/js/plugins/layer/layer.js"></script>
<script src="../../resources/js/pluginsExt/layer/layerExt.js"></script>
<script>
    /**
     * Created by zq on 2017/1/11.
     */
    function operateFormatter(value, row, index) {
        var json =jQuery.parseJSON(JSON.stringify(row));
        window["data_"+index]=json;
        var html="<a id='Audit' onclick='editInfo(data_"+index+")' class='btn btn-outline btn-default' title='编辑' >"+
                "<i class='fa fa-gavel'></i> 查看详情 "+
                "</a>"
        return html;
    }

    function editInfo(obj){
        var json={
            Name:obj.Name,//用户名
            Phone:obj.Phone,//手机号码
            curPoi:obj.curPoi//积分
        }
        addLayerIframe({
            title:'积分详情',
            area:['50%','60%'],
            btn:'',
            btn1:function(){

            },
            url:'newModule/userIntegral/integralDetails.html',
        })
    }

    $(function () {
        //定义table
        var data=[{
            Name:'骑猪闯天下1',
            Phone:'18620906190',
            Gender:'1992-3-21 14:32:08',
            curPoi:'1095',
            Address:'U1',
        }]
        var fulltab=$('#fullTab');
        //初始化通用table,传入第一个参数table对象，第二个参数请求后台的url;
        initTable({
            obj:fulltab,
            data:data,
            showsearchBtn:true,
            search:true
        });

        $('#searchBtn').on('click',function(){
            fulltab.bootstrapTable('refresh');
        })
        //添加按钮事件
        $('.btdAdd').on('click',function(){

        })
    });

</script>
</html>